﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbLayerTableRecord : OdDbSymbolTableRecord
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbLayerTableRecord(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbLayerTableRecord_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbLayerTableRecord obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbLayerTableRecord()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbLayerTableRecord(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbLayerTableRecord cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLayerTableRecord_cast(OdRxObject.getCPtr(pObj));
			OdDbLayerTableRecord result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLayerTableRecord_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLayerTableRecord_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLayerTableRecord_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbLayerTableRecord createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLayerTableRecord_createObject();
			OdDbLayerTableRecord result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbLayerTableRecord)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isFrozen()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isFrozen(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsFrozen(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsFrozen(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isOff()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsOff(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsOff(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool VPDFLT()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_VPDFLT(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setVPDFLT(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setVPDFLT(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isLocked()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isLocked(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsLocked(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsLocked(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isPlottable()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isPlottable(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsPlottable(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsPlottable(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isHidden()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isHidden__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isHidden(OdDbObjectId idLayer)
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isHidden__SWIG_1(OdDbObjectId.getCPtr(idLayer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsHidden(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsHidden(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isReconciled()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isReconciled__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isReconciled(OdDbObjectId idLayer)
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isReconciled__SWIG_1(OdDbObjectId.getCPtr(idLayer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsReconciled(bool bStatus)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsReconciled__SWIG_0(this.swigCPtr, bStatus);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setIsReconciled()
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setIsReconciled__SWIG_1(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmTransparency transparency()
		{
			OdCmTransparency result = new OdCmTransparency(TD_DbPINVOKE.OdDbLayerTableRecord_transparency__SWIG_0(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmTransparency transparency(OdDbObjectId idViewport, out bool pIsOverride)
		{
			OdCmTransparency result = new OdCmTransparency(TD_DbPINVOKE.OdDbLayerTableRecord_transparency__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idViewport), out pIsOverride), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmTransparency transparency(OdDbObjectId idViewport)
		{
			OdCmTransparency result = new OdCmTransparency(TD_DbPINVOKE.OdDbLayerTableRecord_transparency__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idViewport)), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setTransparency(OdCmTransparency cmTransparency)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_setTransparency__SWIG_0(this.swigCPtr, OdCmTransparency.getCPtr(cmTransparency));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTransparency(OdCmTransparency cmTransparency, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setTransparency__SWIG_1(this.swigCPtr, OdCmTransparency.getCPtr(cmTransparency), OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor color()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbLayerTableRecord_color__SWIG_0(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmColor color(OdDbObjectId viewportId, out bool pIsOverride)
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbLayerTableRecord_color__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(viewportId), out pIsOverride), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmColor color(OdDbObjectId viewportId)
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbLayerTableRecord_color__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(viewportId)), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColor(OdCmColor cmColor)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setColor__SWIG_0(this.swigCPtr, OdCmColor.getCPtr(cmColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setColor(OdCmColor cmColor, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setColor__SWIG_1(this.swigCPtr, OdCmColor.getCPtr(cmColor), OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public short colorIndex()
		{
			short result = TD_DbPINVOKE.OdDbLayerTableRecord_colorIndex(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorIndex(short idxColor)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setColorIndex(this.swigCPtr, idxColor);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public LineWeight lineWeight()
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbLayerTableRecord_lineWeight__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineWeight lineWeight(OdDbObjectId idViewport, out bool pIsOverride)
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbLayerTableRecord_lineWeight__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idViewport), out pIsOverride);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineWeight lineWeight(OdDbObjectId idViewport)
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbLayerTableRecord_lineWeight__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLineWeight(LineWeight kLnWtEnum)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setLineWeight__SWIG_0(this.swigCPtr, (int)kLnWtEnum);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineWeight(LineWeight kLnWtEnum, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setLineWeight__SWIG_1(this.swigCPtr, (int)kLnWtEnum, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId linetypeObjectId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_linetypeObjectId__SWIG_0(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId linetypeObjectId(OdDbObjectId idViewport, out bool pIsOverride)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_linetypeObjectId__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idViewport), out pIsOverride);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId linetypeObjectId(OdDbObjectId idViewport)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_linetypeObjectId__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLinetypeObjectId(OdDbObjectId idLinetype)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setLinetypeObjectId__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(idLinetype));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLinetypeObjectId(OdDbObjectId idLinetype, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setLinetypeObjectId__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idLinetype), OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId materialId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_materialId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setMaterialId(OdDbObjectId idMaterial)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setMaterialId(this.swigCPtr, OdDbObjectId.getCPtr(idMaterial));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string plotStyleName()
		{
			string result = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleName__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public string plotStyleName(OdDbObjectId idViewport, out bool pIsOverride)
		{
			string result = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleName__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idViewport), out pIsOverride);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public string plotStyleName(OdDbObjectId idViewport)
		{
			string result = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleName__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId plotStyleNameId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleNameId__SWIG_0(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId plotStyleNameId(OdDbObjectId idViewport, out bool pIsOverride)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleNameId__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(idViewport), out pIsOverride);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId plotStyleNameId(OdDbObjectId idViewport)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLayerTableRecord_plotStyleNameId__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setPlotStyleName(string sPlotStyleName)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_setPlotStyleName__SWIG_0(this.swigCPtr, sPlotStyleName);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPlotStyleName(string sPlotStyleName, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setPlotStyleName__SWIG_1(this.swigCPtr, sPlotStyleName, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPlotStyleName(OdDbObjectId idPlotStyle)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setPlotStyleName__SWIG_2(this.swigCPtr, OdDbObjectId.getCPtr(idPlotStyle));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPlotStyleName(OdDbObjectId idPlotStyle, OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setPlotStyleName__SWIG_3(this.swigCPtr, OdDbObjectId.getCPtr(idPlotStyle), OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string description()
		{
			string result = TD_DbPINVOKE.OdDbLayerTableRecord_description(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDescription(string sDescription)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_setDescription(this.swigCPtr, sDescription);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isInUse()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_isInUse(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields_R12(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_dxfInFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields_R12(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_dxfOutFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subErase(bool erasing)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLayerTableRecord_subErase(this.swigCPtr, erasing);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint subSetAttributes(OdGiDrawableTraits pTraits)
		{
			uint result = TD_DbPINVOKE.OdDbLayerTableRecord_subSetAttributes(this.swigCPtr, OdGiDrawableTraits.getCPtr(pTraits));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool subWorldDraw(OdGiWorldDraw pWd)
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_subWorldDraw(this.swigCPtr, OdGiWorldDraw.getCPtr(pWd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subViewportDraw(OdGiViewportDraw pVd)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_subViewportDraw(this.swigCPtr, OdGiViewportDraw.getCPtr(pVd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGiDrawable drawable()
		{
			OdGiDrawable result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLayerTableRecord_drawable(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void removeAllOverrides()
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeAllOverrides(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeColorOverride(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeColorOverride(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeLinetypeOverride(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeLinetypeOverride(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeLineWeightOverride(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeLineWeightOverride(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removePlotStyleOverride(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removePlotStyleOverride(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeTransparencyOverride(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeTransparencyOverride(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeViewportOverrides(OdDbObjectId idViewport)
		{
			TD_DbPINVOKE.OdDbLayerTableRecord_removeViewportOverrides(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool hasOverrides(OdDbObjectId idViewport)
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_hasOverrides(this.swigCPtr, OdDbObjectId.getCPtr(idViewport));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool hasAnyOverrides()
		{
			bool result = TD_DbPINVOKE.OdDbLayerTableRecord_hasAnyOverrides(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
